'use strict';
angular.module('app').controller('companyCtrl',['$http','$state','$scope',function($http,$state,$scope){
	// console.log($scope);
	$http.get('data/company.json?id='+$state.params.id).then(function Success(resp){
		$scope.company = resp.data;
		$scope.position = resp.data.positionClass[0].positionList;
		$scope.bool=0;
		$scope.$broadcast('abc',{id:1});//广播事件必须后加载，先有人接受在之后加载出广播时间即可
	});
	 $scope.$on('cba',function(event,data){
	 	console.log(event,data);
	 })
	
}]);